package stub;

import java.util.LinkedList;
import java.util.List;

import data.CollegePlan;
import data.Course;
import data.CourseAssistInfo;
import data.Model;
import data.Student;
import data.StudentCourScoreRecord;
import data.SubModel;
import data.TeachingFramework;
import blservice.College_logicServer;

public class College_logicservice_stub implements College_logicServer {
	TeachingFramework framework;
	CourseAssistInfo csi;
	List<StudentCourScoreRecord> soc;
	List<Student> students;


public College_logicservice_stub(TeachingFramework framework,
			CourseAssistInfo csi, List<StudentCourScoreRecord> soc,
			List<Student> students) {
		super();
		this.framework = framework;
		this.csi = csi;
		this.soc = soc;
		this.students = students;
	}

//     framework_dataservice;
	
	@Override
	public TeachingFramework getFramework() {
		
		return this.framework;
	}
 
	@Override
	public boolean editSubModel(String modelName, String subModelID,
			SubModel subModel) {
		System.out.println("edit successfully");
		return false;
	}

	@Override
	public boolean commitPlan(CollegePlan p) {
		System.out.println("commit successfully");
		return false;
	}

	@Override
	public boolean publishCourses(int grade, List<Course> courses) {
		System.out.println("Grade"+grade+":");
		for(Course c : courses){
		     System.out.println(c);
		}
		return true;
	}

	@Override
	public boolean addCourse(Course c) {
		// TODO Auto-generated method stub
		System.out.println("add successfully");
		return false;
	}

	@Override
	public CourseAssistInfo showCourseDetail(String courseID) {
		// TODO Auto-generated method stub
		System.out.println("course "+courseID+" :");
		System.out.println(this.csi);
		
		return this.csi;
	}

	@Override
	public List<StudentCourScoreRecord> getStudentsOfCourse(String courseID) {
		for(StudentCourScoreRecord s : this.soc){
			System.out.println(s);
		}
		return this.soc;
	}

	@Override
	public boolean changeCourse(String courseID, Course newCourse) {
		 System.out.println("change successfully");
		return false;
	}

	@Override
	public boolean changeScore(String courseID, String studentID, int newScore) {
		System.out.println("change successfully");
		return false;
	}

	@Override
	public List<Student> showStudents(int grade) {
		// TODO Auto-generated method stub
		for(Student s : students){
			System.out.println(s);
		}
		return null;
	}
}
